package main

import (
	"fmt"
)

func modifyUser(users map[string]map[string]string, name string) {
	if users[name] != nil {
		users[name]["password"] = "888888"
		fmt.Println(users[name])
	} else {
		users[name] = make(map[string]string)
		users[name]["nickname"] = "aa"
		users[name]["password"] = "123456"
		fmt.Println(users[name])
	}

}

func main() {
	var execMap map[string]map[string]string
	execMap = make(map[string]map[string]string)
	execMap["zsh"] = make(map[string]string)
	execMap["zsh"]["nickname"] = "bb"
	execMap["zsh"]["password"] = "123456"

	// modifyUser(execMap, "zsh")

	modifyUser(execMap, "tom")
}
